package com.itheima.homework01;

public class ShowHandlerDemo {
    public static void main(String[] args) {
        useShowHandle(new ShowHandler() {
            @Override
            public void show() {
                System.out.println("展示");
            }
        });
        //lambda表达式,进行简化
        useShowHandle(()-> System.out.println("展示"));
    }

    private static void useShowHandle(ShowHandler showHandler) {
        showHandler.show();
    }

}
